<?php $host = sfConfig::get('app_host')?>

<form action="<?php echo url_for('match/index')?>" method="GET">
    <?php include_partial('partial/search', array());?>
</form>

<br clear="all">
<br clear="all">
<table width="100%" cellpadding="0" cellspacing="0">
  <thead>
    <tr>
      <th>#</th>
      <th>Match</th>
      <th>League</th>
      <th>Date</th>
      <th>Place</th>
      <th>Summary</th>
      <th>Video</th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <?php $i = 0; foreach ($pager->getResults() as $rs): ?>
    <tr <?php if($i%2 != 0) echo 'class="odd"'?>>
        <td><?php echo ++$i?></td>
        <td><a href="<?php echo url_for('match/edit?id='.$rs->getId())?>" class="action"><b><?php echo $rs?></b></a><br></td>
        <td><?php echo $rs->getLeague() ?></td>
        <td><?php echo $rs->getDate() ?></td>
        <td><?php echo $rs->getPlace() ?></td>
        <td><?php echo $rs->getSummary() ?></td>
        <td><a href="<?php echo $rs->getVideo() ?>" target="_blank"><?php echo $rs->getVideo() ?></a></td>
        <td nowrap>
            <?php include_partial('partial/editDelete', array('module'=>'match', 'id'=>$rs->getId()));?>
        </td> 
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>
<?php echo pager($pager, 'match/index?s='.$sf_params->get('s'))?>
